package com.javasoft.controller.WJC;

import com.javasoft.entity.WJC.Exam;
import com.javasoft.entity.WJC.paperRuleEntity;
import com.javasoft.entity.XGX.Practice;
import com.javasoft.service.WJC._interface.ExamGeneratorService;
import com.javasoft.service.XGX.impl.QuestionImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/exam")
public class ExamController {
    @Autowired
    private  ExamGeneratorService examGeneratorService;


    @PostMapping("/generate/{paperRuleId}")
    public List<Practice> generateExam(@PathVariable Long paperRuleId) {

        return examGeneratorService.generateExamByPaperRuleId(paperRuleId);

    }
}